﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;

namespace ebc.componentbinder.tests
{
    [TestFixture]
    public class test_IsEbcEvent
    {
        [Test]
        public void Recognize_event()
        {
            var ei = typeof (OnlyRelevantEvents).GetEvents().First();
            Assert.IsTrue(ei.IsEbcEvent());
        }


        [Test]
        public void Reject_irrelevant_events()
        {
            var ei = typeof(SomeRelevantEvents).GetEvent("OnStringInt");
            Assert.IsFalse(ei.IsEbcEvent());

            ei = typeof(SomeRelevantEvents).GetEvent("OnStringReturnInt");
            Assert.IsFalse(ei.IsEbcEvent());
        }
    }
}
